﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Arbalest.Web
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            // Ignore additional routes that are handled by HttpHandlers
            routes.IgnoreRoute("{resource}.sample/{*pathInfo}");

            //http://localhost:1475/StorageLocation/Create?companyId=21
            //routes.MapRoute(
            //    name: "Parent_Child",
            //    url: "{controller}/{action}/{parentId}/{id}",
            //    defaults: new { controller = "Home", action = "Index", parentId = UrlParameter.Optional, id = UrlParameter.Optional }
            //);

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );


            // Add routes for Arbalest.Web.RouteHandlers.ImageHandler
            //RouteTable.Routes.Add(
            //    "ImagesRoute", 
            //    new Route("privateImage/{uniqueIdentifier}", new ImageHandler()));
        }
    }
}